#include<iostream>
using namespace std;


//class A {
//public:
//
//private:
//
//};



template<typename T>
void Swap(T& left, T& right)
{
	
	T tmp = left;
	left = right;
	right = tmp;
}

int main()
{
	int a = 0, b = 1;
	double c = 2.2, d = 3.3;
	Swap(a, b);
	Swap(c, d);
	cout << a  << " " << b << endl;
	cout << c <<" "<< d << endl;



	return 0;
}